package com.gintama.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.gintama.mapper.UserMapper;
import com.gintama.po.User;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/")
public class MyBaController {

    @Autowired
    private UserMapper userMapper;

    @RequestMapping("/myba")
    public List<User> myba()  {
        List<User> users = userMapper.selectList(new LambdaQueryWrapper<>());
        System.out.println(users);
        log.info(users.toString());
        return users;
    }

}
